﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Runtime.Serialization;
using System.ComponentModel.DataAnnotations;
using AMS.DD35.Common;

namespace AMS.DD35.Common.Data
{
    [DataContract]
    public class CharacterData
    {
        // this is handled by Entity Framework
        [DataMember]
        [Required]
        public string UserName { get; set; }
        [DataMember]
        public long CharacterID { get; set; }
        [DataMember]
        [Required]
        public string CharacterName { get; set; }

        // base stats
        [DataMember]
        public byte BaseStrength { get; set; }
        [DataMember]
        public byte BaseDexterity { get; set; }
        [DataMember]
        public byte BaseConstitution { get; set; }
        [DataMember]
        public byte BaseIntelligence { get; set; }
        [DataMember]
        public byte BaseWisdom { get; set; }
        [DataMember]
        public byte BaseCharisma { get; set; }

        [DataMember]
        public MoralAlignment MoralAlignment { get; set; }
        [DataMember]
        public EthicalAlignment EthicalAlignment { get; set; }
        [DataMember]
        public short RaceID { get; set; }
        //string Enthnicity { get; set; }
        [DataMember]
        public short DeityID { get; set; }
        [DataMember]
        [Required]
        public string HairColor { get; set; }
        [DataMember]
        [Required]
        public string EyeColor { get; set; }
        [DataMember]
        public byte Height { get; set; }
        [DataMember]
        [Required]
        public string HeightUnits { get; set; }
        [DataMember]
        public byte Weight { get; set; }
        [DataMember]
        [Required]
        public string WeightUnits { get; set; }
        [DataMember]
        public string Sex { get; set; }

        // inherent gains
        [DataMember]
        public Dictionary<int, Ability> InherentAbilityGains { get; set; }

        // List<CharacterLevel>
        [DataMember]
        public IEnumerable<string> Classes { get; set; }

        // skill points distribution
        [DataMember]
        public Dictionary<Skill, int[][]> SkillPoints { get; set; } // skill, level, points

        // feats
        [DataMember]
        public List<string> Feats { get; set; }

        [DataMember]
        public int Experience { get; set; }

        // coinage
        [DataMember]
        public int Copper { get; set; }
        [DataMember]
        public int Silver { get; set; }
        [DataMember]
        public int Gold { get; set; }
        [DataMember]
        public int Platinum { get; set; }

        public override string ToString()
        {
            // CharacterName (Cls#/Cls#/...)
            return CharacterName;
        }
    }
}
